package com.github.bobjoy.java.thread.lock;

public class LockDemo {

    private static Lock lock = new Lock();

    public static void main(String[] args) throws InterruptedException {
        lock.lock();
        add();
        lock.unlock();
    }

    public static void add() throws InterruptedException {
        lock.lock();
        System.out.println("do something...");
        lock.unlock();
    }

}

